"""
工具注册中心
"""
from typing import Dict, List, Any, Callable, Awaitable

tool_registry: Dict[str, Callable[..., Awaitable[List[Dict[str, Any]]]]] = {}

def register_tool(
    name: str,
    description: str,
    input_schema: Dict[str, Any],
    implementation: Callable[..., Awaitable[List[Dict[str, Any]]]]
):
    """注册工具"""
    global tool_registry
    if name in tool_registry:
        print(f"工具 '{name}' 已存在，将被覆盖")
    tool_registry[name] = implementation